ÄúµÄλÖãºÑ°ÃÎÍøÊ×Ò³£¾±à³ÌÀÖÔ°£¾VBScript£¾VBScript


objects constants operators statements functions properties methods






FUNCTION:  CCur( )

You can determine the expression subtype by using the function VarType( ).


CCur(Number)

The CCur function converts any number to the variant of subtype Currency.

Converts to currency values ranging from
-922,337,203,685,477.5808 to 922,337,203,685,477.5807

Code:
<% anynumber=(12345) %>
<% =CCur(anynumber) %>

Output:
12345

This function rounds off to 4 decimal places.

Code:
<% anynumber=(55555.123456) %>
<% =CCur(anynumber) %>

Output:
55555.1235